// @ts-ignore
import reactRefresh from '@vitejs/plugin-react-refresh'
import {defineConfig} from 'vite'

export default defineConfig({
    build: {
        base: '/react-lowcode-platform/',
        outDir: 'docs',
    },
    optimizeDeps: {
        include: []
    },
    plugins: [reactRefresh()],
    esbuild: {
        jsxInject: "import React from 'react'", // 全局引入
    },
    css: {
        preprocessorOptions: {
          scss: {
            additionalData: `
            @import "~@/assets/styles/mixin.scss";
            @import "~@/assets/styles/_variable.scss";`
          }
        }
      }
})
